package org.upida;

import org.codehaus.jackson.JsonNode;

public interface IJsonParser {

	/**
	 * parses JSON data into domain object
	 * @param data json data
	 * @param type the domain object type
	 * @return
	 */
	<T extends Dtobase> T parse(JsonNode data, Class<?> type);

	/**
	 * parses JSON data into a list of domain objects
	 * @param data json data
	 * @param type the domain object type
	 * @return
	 */
	<T extends Dtobase> Iterable<T> parseList(JsonNode data, Class<?> type);
}